Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move files_external mount config to the database #20370

Merged
merged 1 commit into from
Dec 4, 2015
Merged

Conversation

icewind1991
Copy link
Contributor

TODO:

cc @PVince81 @Xenopathic

@icewind1991 icewind1991 added this to the 9.0-current milestone Nov 6, 2015
<name>*dbprefix*external_mounts</name>
<declaration>
<field>
<name>mount_id</name>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id is enough

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep the column names a bit more descriptive to make the queries more readable

@icewind1991 icewind1991 force-pushed the external-db-config branch 2 times, most recently from bdcf061 to df53bc7 Compare November 23, 2015 14:06
@icewind1991
Copy link
Contributor Author

Added migration, no tests for now, not sure how to do it bests.

@PVince81 @Xenopathic feel like reviewing 😄

@icewind1991
Copy link
Contributor Author

Currently migration leaves the original mount.json files in tact.

Once everything is properly tested I would like to rename them to something like mount.json.backup

I don't want to remove them since that would remove any chance of (manual) recovery in case of migration errors

@MorrisJobke
Copy link
Contributor

@icewind1991 Update also the title and the labels if this is ready for review. Thanks :)

@PVince81
Copy link
Contributor

Once everything is properly tested I would like to rename them to something like mount.json.backup

@icewind1991 sounds good

@icewind1991 icewind1991 changed the title [WIP] Move files_external mount config to the database Move files_external mount config to the database Nov 27, 2015
@icewind1991
Copy link
Contributor Author

I think this is ready for review, there's still work to be done but it shouldn't cause any regressions and it's easier to work on the remaining stuff in smaller bits

$applicableGroups[] = $applicable;
$storageConfig->setApplicableGroups($applicableGroups);
}
return $storageConfig;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this was simply moved from the existing code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@PVince81
Copy link
Contributor

PVince81 commented Dec 1, 2015

The code looks good, missing a few PHPDocs for clarification.
I'm a bit surprised about the amount of code and gymnastics needed with the config, but this is understandable because storage configs have multiple dimensions.

👍

@PVince81
Copy link
Contributor

PVince81 commented Dec 1, 2015

@icewind1991 please set to "To review" after you updated according to the comments.

@icewind1991
Copy link
Contributor Author

Added phpdocs

@PVince81
Copy link
Contributor

PVince81 commented Dec 2, 2015

Needs a second reviewer @Xenopathic @DeepDiver1975

@PVince81
Copy link
Contributor

PVince81 commented Dec 3, 2015

Files external test plan by @davitol owncloud/QA#39

Please note that for this PR only the storage configuration needs to be tested (with updates), no need to test all operations of the storages themselves. As long as the storage is mounted properly and upload works, then it's fine.

@davitol
Copy link
Contributor

davitol commented Dec 4, 2015

👍

@PVince81
Copy link
Contributor

PVince81 commented Dec 4, 2015

Oh, there's an Oracle issue...
Let me quickly rebase this to refire it.

@PVince81
Copy link
Contributor

PVince81 commented Dec 4, 2015

Oracle fail:

08:13:45 .............................................E..PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, class '\OCA\Files_Sharing\Hooks' not found in /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php on line 104
08:22:57 PHP Stack trace:
08:22:57 PHP   1. {main}() /usr/local/bin/phpunit:0
08:22:57 PHP   2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:537
08:22:57 PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:105
08:22:57 PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:153
08:22:57 PHP   5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:406
08:22:57 PHP   6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:57 PHP   7. call_user_func:{phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727}() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727
08:22:57 PHP   8. OCA\Files_Sharing\Tests\TestCase::tearDownAfterClass() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727
08:22:57 PHP   9. OC_User::deleteUser() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/apps/files_sharing/tests/testcase.php:114
08:22:57 PHP  10. OC\User\User->delete() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/user.php:231
08:22:57 PHP  11. OC\Hooks\PublicEmitter->emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/user/user.php:195
08:22:57 PHP  12. OC\Hooks\BasicEmitter->emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/publicemitter.php:32
08:22:57 PHP  13. call_user_func_array:{/ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98
08:22:57 PHP  14. OC\Server->OC\{closure}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98
08:22:57 PHP  15. OC_Hook::emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/server.php:211
08:22:57 PHP  16. call_user_func:{/ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php:104}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php:104
08:22:57 PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, class '\OCA\Files_Sharing\Hooks' not found in /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php on line 104
08:22:57 PHP Stack trace:
08:22:57 PHP   1. {main}() /usr/local/bin/phpunit:0
08:22:57 PHP   2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:537
08:22:57 PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:105
08:22:57 PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:153
08:22:57 PHP   5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:406
08:22:57 PHP   6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:57 PHP   7. call_user_func:{phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727}() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727
08:22:57 PHP   8. OCA\Files_Sharing\Tests\TestCase::tearDownAfterClass() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727
08:22:57 PHP   9. OC_User::deleteUser() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/apps/files_sharing/tests/testcase.php:115
08:22:57 PHP  10. OC\User\User->delete() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/user.php:231
08:22:57 PHP  11. OC\Hooks\PublicEmitter->emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/user/user.php:195
08:22:57 PHP  12. OC\Hooks\BasicEmitter->emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/publicemitter.php:32
08:22:57 PHP  13. call_user_func_array:{/ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98
08:22:57 PHP  14. OC\Server->OC\{closure}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98
08:22:57 PHP  15. OC_Hook::emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/server.php:211
08:22:57 PHP  16. call_user_func:{/ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php:104}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php:104
08:22:57 PHP Warning:  call_user_func() expects parameter 1 to be a valid callback, class '\OCA\Files_Sharing\Hooks' not found in /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php on line 104
08:22:57 PHP Stack trace:
08:22:57 PHP   1. {main}() /usr/local/bin/phpunit:0
08:22:57 PHP   2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:537
08:22:57 PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:105
08:22:57 PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:153
08:22:57 PHP   5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:406
08:22:57 PHP   6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:57 PHP   7. call_user_func:{phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727}() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727
08:22:57 PHP   8. OCA\Files_Sharing\Tests\TestCase::tearDownAfterClass() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:727
08:22:57 PHP   9. OC_User::deleteUser() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/apps/files_sharing/tests/testcase.php:116
08:22:57 PHP  10. OC\User\User->delete() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/user.php:231
08:22:57 PHP  11. OC\Hooks\PublicEmitter->emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/user/user.php:195
08:22:57 PHP  12. OC\Hooks\BasicEmitter->emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/publicemitter.php:32
08:22:57 PHP  13. call_user_func_array:{/ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98
08:22:57 PHP  14. OC\Server->OC\{closure}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hooks/emittertrait.php:98
08:22:57 PHP  15. OC_Hook::emit() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/server.php:211
08:22:57 PHP  16. call_user_func:{/ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php:104}() /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/lib/private/hook.php:104
08:22:57 PHP Fatal error:  Call to a member function getFileInfo() on null in /ssd/jenkins/workspace/core-ci-linux/database/oci/label/SLAVE/apps/files_sharing/tests/permissions.php on line 116
08:22:57 PHP Stack trace:
08:22:57 PHP   1. {main}() /usr/local/bin/phpunit:0
08:22:57 PHP   2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:537
08:22:57 PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:105
08:22:57 PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:153
08:22:57 PHP   5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:406
08:22:57 PHP   6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:57 PHP   7. PHPUnit_Framework_TestCase->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:57 PHP   8. PHPUnit_Framework_TestResult->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:699
08:22:57 PHP   9. PHP_Invoker->invoke() phar:///usr/local/bin/phpunit/phpunit/Framework/TestResult.php:607
08:22:57 PHP  10. call_user_func_array:{phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93}() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
08:22:57 PHP  11. PHPUnit_Framework_TestCase->runBare() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
08:22:57 PHP  12. Test_Files_Sharing_Permissions->tearDown() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:774
08:22:57 PHP Warning:  Unknown: Cannot destroy the zip context in Unknown on line 0
08:22:57 PHP Stack trace:
08:22:57 PHP   1. {main}() /usr/local/bin/phpunit:0
08:22:57 PHP   2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:537
08:22:57 PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:105
08:22:57 PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:153
08:22:57 PHP   5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:406
08:22:57 PHP   6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:57 PHP   7. PHPUnit_Framework_TestCase->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:57 PHP   8. PHPUnit_Framework_TestResult->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:699
08:22:57 PHP   9. PHP_Invoker->invoke() phar:///usr/local/bin/phpunit/phpunit/Framework/TestResult.php:607
08:22:57 PHP  10. call_user_func_array:{phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93}() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
08:22:57 PHP  11. PHPUnit_Framework_TestCase->runBare() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
08:22:57 PHP  12. Test_Files_Sharing_Permissions->tearDown() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:774
08:22:57 PHP Warning:  Unknown: Cannot destroy the zip context in Unknown on line 0
08:22:57 PHP Stack trace:
08:22:57 PHP   1. {main}() /usr/local/bin/phpunit:0
08:22:58 PHP   2. PHPUnit_TextUI_Command::main() /usr/local/bin/phpunit:537
08:22:58 PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:105
08:22:58 PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/bin/phpunit/phpunit/TextUI/Command.php:153
08:22:58 PHP   5. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/TextUI/TestRunner.php:406
08:22:58 PHP   6. PHPUnit_Framework_TestSuite->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:58 PHP   7. PHPUnit_Framework_TestCase->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestSuite.php:722
08:22:58 PHP   8. PHPUnit_Framework_TestResult->run() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:699
08:22:58 PHP   9. PHP_Invoker->invoke() phar:///usr/local/bin/phpunit/phpunit/Framework/TestResult.php:607
08:22:58 PHP  10. call_user_func_array:{phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93}() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
08:22:58 PHP  11. PHPUnit_Framework_TestCase->runBare() phar:///usr/local/bin/phpunit/php-invoker/Invoker.php:93
08:22:58 PHP  12. Test_Files_Sharing_Permissions->tearDown() phar:///usr/local/bin/phpunit/phpunit/Framework/TestCase.php:774

@PVince81
Copy link
Contributor

PVince81 commented Dec 4, 2015

Doesn't look directly related, but also doesn't seem to fail on master.

@icewind1991
Copy link
Contributor Author

@PVince81
Copy link
Contributor

PVince81 commented Dec 4, 2015

Okay, maybe it was the old one... I clicked on Details while it was still running.

PVince81 pushed a commit that referenced this pull request Dec 4, 2015
 Move files_external mount config to the database
@PVince81 PVince81 merged commit e91eba4 into master Dec 4, 2015
@PVince81 PVince81 deleted the external-db-config branch December 4, 2015 13:42
@LukasReschke
Copy link
Member

This probably broke ownCloud mounts: #22605

@lock
Copy link

lock bot commented Aug 7, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants